package com.relax.service.impl;

import com.relax.entity.Order;
import com.relax.service.OrderService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service
public class OrderServiceImpl implements OrderService {

    @Value("${inst.name}")
    private String name;

    @Value("${inst.nacos:未找到配置,本地默认值}")
    private String nacosname;


    @Override
    public Order createOrder(Integer userId) {
        System.out.println("createOrder.............");
        Order order = new Order();
        order.setOrderNo(System.currentTimeMillis() + "_" + name + "    nacos的name==>" + nacosname);
        order.setId(userId);
        return order;
    }
}
